package com.lagou.listener_demo;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class MyServletContextListener1 implements ServletContextListener {
    /*
    * 监听ServletContext对象创建的方法
    * */
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("监听到servletcontext对象创建了...");
    }
    /*
     * 监听ServletContext对象销毁的方法
     * */
    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("监听到servletcontext对象销毁了...");
    }
}
